#ifndef _HAL_SPI_H
#define _HAL_SPI_H

#include "ch32v20x_gpio.h"
#include "ch32v20x_spi.h"
#include "ch32v20x_rcc.h"

enum SPI_IO_GROUP {
    SPI_GROUPA = 0,
    SPI_GROUPB
};

struct spi_type{
  void (*init)(enum SPI_IO_GROUP);
  uint8_t  (*read_write)(uint8_t);
};

extern struct spi_type spi1;
#endif
